Conversation
skvadrik
left a comment
There was a problem hiding this comment.
Thanks for the port!
A minor thing, but can you put all PHP entries sorted alphabetically, between OCaml and Python?
Also, please rebase on top of master.
This is a partial review. I'll do the full review as soon as I can, but I broke my arm a few days ago, and I'm slower than usual.
|
@skvadrik I adjusted alphabetically the implementation. There are still work in examples/ and I'll need your help in some already made examples, especially with |
Thanks!
I think you should use |
| single_quoted_strings = 1; | ||
| indentation_sensitive = 0; | ||
| wrap_blocks_in_braces = 1; | ||
|
|
There was a problem hiding this comment.
I've added a new configuration special_escapes that needs to go here, see other syntax files.
| @@ -0,0 +1,16 @@ | |||
| <?php | |||
| // re2php $INPUT -o $OUTPUT | |||
There was a problem hiding this comment.
I think it should always be the first line of the file (as expected by run_tests.py).
There was a problem hiding this comment.
Impossible, as <?php must be on 1st line.
There was a problem hiding this comment.
I see. Then I suggest adding some sed magic in examples/php/__run_all.sh that will cut off the comments in the temporary file (this one and the one autogenerated by re2php).
| supported_api_styles = ["free-form"]; | ||
| supported_code_models = ["loop-switch"]; | ||
| supported_targets = ["code", "dot"]; | ||
| supported_features = ["nested-ifs", "bitmaps", "tags", "captures", "captvars"]; |
There was a problem hiding this comment.
For all supported and unsupported features there must be a test. Tags, captures and captvars are covered by examples, and for the rest see tests in test/codegen/<language>.
| "java" end { *lang = Lang::JAVA; goto opt; } | ||
| "js" end { *lang = Lang::JS; goto opt; } | ||
| "ocaml" end { *lang = Lang::OCAML; goto opt; } | ||
| "php" end { *lang = Lang::PHP; goto opt; } |
There was a problem hiding this comment.
Add it to the error message on line 249 as well.
|
So I downloaded the patch and tried to build some of the problematic examples, but it seems that the .php files are not generated from the current syntax file (it was copied from javascript without modification). Please let me know when you update it (or if you have any questions). |
No description provided.